﻿<%@ Page Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="NhapNV.aspx.cs"
    Inherits="ChamCong.Admin.NhapNV" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <!--Calendar Script-->
    <link type="text/css" rel="stylesheet" href="../Scripts/JSCal/css/jscal.css" />
    <link type="text/css" rel="stylesheet" href="../Scripts/JSCal/css/border-radius.css" />
    <script type="text/javascript" src="../Scripts/JSCal/js/jscal2.js"></script>
    <script type="text/javascript" src="../Scripts/JSCal/js/lang/vn.js"></script>
    <!--End Calendar-->
    <script type="text/javascript">
//        function Redirect()
//        {
//            var answer = confirm("Tạo nhân viên mới thành công!\nBạn có muốn phân quyền nhân viên?")
//            if (answer) {
//                if (document.getElementById("txtTenDangNhap").value == "") {
//                    alert('Bạn chưa tạo tài khoản, vui lòng điền đầy đủ thông tin tên đăng nhập!');
//                    setTimeout(function () { document.getElementById('txtTenDangNhap').focus(); ; }, 1);
//                    
//                    var v = document.getElementById("txtTenDangNhap");
//                    v.style.backgroundColor = "pink";
//                    return false;
//                }
//                else {
//                    window.location = "../Admin/QuanLyPhanQuyen.aspx?tt=pq&nv=" + document.getElementById("txtMaNV").value;
//                }
//            }
//            else {
//                //return false;
//                window.location = "../LanhDao/NhapNV.aspx";
//            }
//        }
    </script>
    <style type="text/css">
        .style1
        {
            width: 160px;
        }
        .style2
        {
            width: 250px;
        }
        .style3
        {
            width: 150px;
            font-weight: bold;
        }
        .divcenter
        {
            width: 850px;
            margin: 5px;
        }
        .divleft
        {
            width: 355px;
            float: left;
            margin: 5px;
        }
        .divright
        {
            width: 355px;
            float: right;
            margin: 5px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server">
    <asp:UpdatePanel ID="ThongTinNhanVien" runat="server">
        <ContentTemplate>
            <div>
                <asp:ScriptManager ID="ScriptManager1" runat="server">
                </asp:ScriptManager>
                <div class="divcenter">
                    <table id="thongtincanhan" style="width: 820px">
                        <tr>
                            <td class="style1">
                                Mã Nhân Viên :
                            </td>
                            <td class="style2">
                                <asp:TextBox ID="txtMaNV" runat="server" Width="80%"></asp:TextBox>
                                <asp:Label ID="Label1" runat="server" Text="(*)" ForeColor="Red"></asp:Label>
                            </td>
                            <td class="style1">
                                Tên Nhân Viên :
                            </td>
                            <td class="style2">
                                <asp:TextBox ID="txtHoTen" runat="server" Width="80%"></asp:TextBox>
                                <asp:Label ID="Label2" runat="server" Text="(*)" ForeColor="Red"></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td class="style1">
                                Ngày Sinh :
                            </td>
                            <td class="style2">
                                <asp:TextBox ID="txtNgaySinh" runat="server" Width="80%"></asp:TextBox>
                                <script type="text/javascript">
                                    Cal = new Calendar({
                                        inputField: "txtNgaySinh",
                                        dateFormat: "%d/%m/%Y",
                                        trigger: "txtNgaySinh",
                                        bottomBar: false,
                                        onSelect: function () { this.hide(); }
                                    });
                                </script>
                            </td>
                            <td class="style1">
                                Giới Tính :
                            </td>
                            <td class="style2">
                                <asp:DropDownList ID="drGioiTinh" runat="server">
                                    <asp:ListItem>Nam</asp:ListItem>
                                    <asp:ListItem>Nữ</asp:ListItem>
                                </asp:DropDownList>
                            </td>
                        </tr>
                        <tr>
                            <td class="style1">
                                Quốc Tịch :
                            </td>
                            <td class="style2">
                                <asp:TextBox ID="txtQuocTich" runat="server" Width="80%"></asp:TextBox>
                            </td>
                            <td class="style1">
                                Số CMND :
                            </td>
                            <td class="style2">
                                <asp:TextBox ID="txtCMND" runat="server" Width="80%"></asp:TextBox>
                                <asp:Label ID="Label3" runat="server" Text="(*)" ForeColor="Red"></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td class="style1">
                                Số Điện Thoại :
                            </td>
                            <td class="style2">
                                <asp:TextBox ID="txtSoDT" runat="server" Width="80%"></asp:TextBox>
                                <asp:Label ID="Label4" runat="server" Text="(*)" ForeColor="Red"></asp:Label>
                            </td>
                            <td class="style1">
                                ĐC Email :
                            </td>
                            <td class="style2">
                                <asp:TextBox ID="txtEmail" runat="server" Width="80%"></asp:TextBox><span id="Emailer"
                                    style="color: #FF0000; font-size: 14px"></span>
                            </td>
                        </tr>
                        <tr>
                            <td class="style1">
                                Đ/C Thường Trú :
                            </td>
                            <td colspan="3">
                                <asp:TextBox ID="txtThuongTru" runat="server" Width="500px"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td class="style1">
                                Đ/C Tạm Trú :
                            </td>
                            <td colspan="3">
                                <asp:TextBox ID="txtTamTru" runat="server" Width="500px"></asp:TextBox>
                            </td>
                        </tr>
                    </table>
                </div>
                <%--                <div class="" style="margin: 5px;">
                    <table id="thongtindangnhap">
                        
                    </table>
                </div>--%>
                <div class="divcenter">
                    <div class="divright">
                        <table id="thongtincongty" style="width: 400px">
                            <tr>
                                <td class="style3">
                                    Ngày Vào Làm :
                                </td>
                                <td>
                                    <asp:TextBox ID="txtNgayVaoLam" runat="server" Width="80%"></asp:TextBox>
                                    <script type="text/javascript">
                                        Cal = new Calendar({
                                            inputField: "txtNgayVaoLam",
                                            dateFormat: "%d/%m/%Y",
                                            trigger: "txtNgayVaoLam",
                                            bottomBar: false,
                                            onSelect: function () { this.hide(); }
                                        });
                                    </script>
                                </td>
                            </tr>
                            <tr>
                                <td class="style3">
                                    <div>
                                        Phòng Ban :</div>
                                </td>
                                <td>
                                    <asp:DropDownList ID="drPhongBan" runat="server" DataSourceID="DSPhongBan" DataTextField="TenPB"
                                        DataValueField="MaPB">
                                    </asp:DropDownList>
                                    <asp:ObjectDataSource ID="DSPhongBan" runat="server" SelectMethod="LayTatCa" TypeName="BusinessLogicLayer.PhongBanBLL">
                                    </asp:ObjectDataSource>
                                </td>
                            </tr>
                            <tr>
                                <td class="style3">
                                    Loại Nhân Viên :
                                </td>
                                <td>
                                    <asp:DropDownList ID="drLoaiNV" runat="server" Width="70%" DataSourceID="TatCaLoaiNV"
                                        DataTextField="TenLoaiNV" DataValueField="MaLoaiNV">
                                    </asp:DropDownList>
                                    <asp:ObjectDataSource ID="TatCaLoaiNV" runat="server" SelectMethod="LayTatCa" TypeName="BusinessLogicLayer.LoaiNVBLL">
                                    </asp:ObjectDataSource>
                                </td>
                            </tr>
                            <tr>
                                <td class="style3">
                                    Chức Vụ :
                                </td>
                                <td>
                                    <div align="left" style="width: 80%; height: 100px; overflow: auto; background-color: #F2F2F2;">
                                        <asp:CheckBoxList ID="cblChucVu" runat="server" DataSourceID="DSChucVu" DataTextField="TenCV"
                                            DataValueField="MaCV">
                                        </asp:CheckBoxList>
                                        <asp:ObjectDataSource ID="DSChucVu" runat="server" SelectMethod="LayTatCa" TypeName="BusinessLogicLayer.ChucVuBLL">
                                        </asp:ObjectDataSource>
                                    </div>
                                </td>
                            </tr>
                            <tr>
                                <td class="style3">
                                    Lương Cơ Bản :
                                </td>
                                <td>
                                    <asp:TextBox ID="txtLuongCoBan" runat="server" Width="80%"></asp:TextBox>(VND)
                                </td>
                            </tr>
                            <tr>
                                <td class="style3">
                                    Ngày nghỉ thường niên:
                                </td>
                                <td>
                                    <asp:TextBox ID="txtNgayNghi" runat="server" Width="80%"></asp:TextBox>(VND)
                                </td>
                            </tr>
                        </table>
                    </div>
                    <div class="divleft">
                        <table id="thongtinhocvan" style="width: 410px;">
                            <tr>
                                <td class="style3">
                                    Tên Đăng Nhập:
                                </td>
                                <td class="style2">
                                    <asp:TextBox ID="txtTenDangNhap" runat="server"></asp:TextBox>
                                    <br />
                                    (Mật khẩu là CMND)
                                </td>
                            </tr>
                            <tr>
                                <td class="style3">
                                    Trình Độ HV :
                                </td>
                                <td class="style2">
                                    <asp:DropDownList ID="HocVan" runat="server" Width="30%">
                                        <asp:ListItem>12/12</asp:ListItem>
                                        <asp:ListItem>11/12</asp:ListItem>
                                        <asp:ListItem>10/12</asp:ListItem>
                                        <asp:ListItem>9/12</asp:ListItem>
                                        <asp:ListItem>8/12</asp:ListItem>
                                        <asp:ListItem>7/12</asp:ListItem>
                                        <asp:ListItem>6/12</asp:ListItem>
                                        <asp:ListItem>5/12</asp:ListItem>
                                    </asp:DropDownList>
                                </td>
                            </tr>
                            <tr>
                                <td class="style3">
                                    Loại Bằng Cấp :
                                </td>
                                <td class="style2">
                                    <asp:DropDownList ID="drBangCap" runat="server" Width="70%" DataSourceID="TatCaBangCap"
                                        DataTextField="TenBangCap" DataValueField="MaBangCap">
                                    </asp:DropDownList>
                                    <asp:ObjectDataSource ID="TatCaBangCap" runat="server" SelectMethod="LayTatCa" TypeName="BusinessLogicLayer.BangCapBLL">
                                    </asp:ObjectDataSource>
                                </td>
                            </tr>
                            <tr>
                                <td class="style3">
                                    Nơi Cấp :
                                </td>
                                <td class="style2">
                                    <asp:TextBox ID="txtNoiCap" runat="server" Width="80%"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td class="style3">
                                    Bằng Cấp Khác :
                                </td>
                                <td class="style2">
                                    <asp:TextBox ID="txtBangCapKhac" runat="server" Width="80%" Height="51px" AutoPostBack="True"
                                        TextMode="MultiLine"></asp:TextBox>
                                </td>
                            </tr>
                        </table>
                    </div>
                </div>
                <div class="divcenter">
                    <table style="width: 800px;">
                        <tr align="center">
                            <td>
                                <asp:Label ID="lblTemp" runat="server" Visible="False"></asp:Label>
                                <asp:Button class="button" ID="btnThemNV" runat="server" Text="Thêm" OnClick="btnThemNV_Click"
                                    Width="100px" />
                                <asp:Button class="button" ID="btnHuy" runat="server" Text="Hủy" Width="100px" OnClick="btnHuy_Click" />
                            </td>
                        </tr>
                        <tr>
                            <td colspan="3">
                                <div>
                                    <sbc:sbcMsgBox ID="sbcMsgBox4" runat="server" UseJQuery="True" />
                                </div>
                            </td>
                        </tr>
                    </table>
                </div>
            </div>
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>
